<template>
	<view style="margin: 20rpx 20rpx 0;">
		<!-- <u-cell-group>
      <u-cell-item icon="list-dot" title="作业列表" :arrow="true" arrow-direction="right" @click="gotoJobList"></u-cell-item>
      <u-cell-item icon="edit-pen-fill" title="发布作业" :arrow="true" arrow-direction="right" @click="gotoPublishJob"></u-cell-item>
    </u-cell-group> -->
		<view class="cardClass" v-for="(item,index) in list" :key="index" @click="gotoJobList(item)">
			<u-section :title="item.class_name" sub-title=" "></u-section>
		</view>
	
	</view>
</template>

<script>
	import { getClassInfo2 } from '@/api/jz/class/class.js';
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad: function() {},
		mounted() {
		this.getInit();
		},
		methods: {
			getInit(){
				getClassInfo2().then(res=>{
					if(res.code==200){
						this.list = res.data
					}
				})
			},
			gotoJobList(val) {
				uni.navigateTo({
					url: "/pages/myCertificate/index2?data="+JSON.stringify(val)
				})
			},
			
		}
	}
</script>



<style scoped>
	page {
		background-color: #fafafa;
	}

	.cardClass {
		position: static;
		left: 0px;
		top: 0px;
		width: 100%;
		height: 58px;
		border-radius: 10px;
		opacity: 1;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 16px;
		gap: 16px;
		margin-bottom: 10px;
		background: #fafafa;
		box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.04),
			0px 2px 6px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.04);
		z-index: 0;
	}
</style>